public class CipherMachine {
    public byte[] encrypt(byte[] data, int key) {
        byte[] encryptedData = new byte[data.length];
        for (int i = 0; i < data.length; i++) {
            encryptedData[i] = (byte) (data[i] % key);
        }
        return encryptedData;
    }
}
